package br.Entidade;

import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import br.facebook.android.DialogError;
import br.facebook.android.FacebookError;

final class LoginDialogListener implements
br.facebook.android.Facebook.DialogListener {
	private Handler mHandler = new Handler();
	private DisciplinaToFacebook pai = null;

/**
* Called when the dialog has completed successfully
*/
	
	LoginDialogListener(Handler mHadler, DisciplinaToFacebook  parent){
		this.mHandler = mHadler;
		pai=parent;
	}
public void onComplete(Bundle values) {
// Process onComplete
Log.d("FB Sample App", "LoginDialogListener.onComplete()");
pai.postarDados();
// Dispatch on its own thread
  /*mHandler.post(new Runnable() {
    public void run() {
        pai.postarDados();
    }
});*/
}

/**
*
*/
public void onFacebookError(FacebookError error) {
// Process error
Log.d("FB Sample App", "LoginDialogListener.onFacebookError()");
}

/**
*
*/
public void onError(DialogError error) {
// Process error message
Log.d("FB Sample App", "LoginDialogListener.onError()");
}

/**
*
*/
public void onCancel() {
// Process cancel message
Log.d("FB Sample App", "LoginDialogListener.onCancel()");
}
}
